package com.tudouji.project.customer.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.flow.service.pojo.BasePojo;
import com.flow.service.pojo.flow.FlowTempNode;
import com.tudouji.framework.aspectj.lang.annotation.Excel;
import com.tudouji.project.bill.domain.Sellform;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * 客户管理对象 customer
 *
 * @author wf
 * @date 2020-12-30
 */
@Data
public class Customer extends BasePojo
{
    private static final long serialVersionUID = 1L;

    /** 主键 */
    private String guid;

    private String code;

    /** 客户名称 */
    @Excel(name = "客户名称")
    private String name;
    /** 联系人 */
    @Excel(name = "联系人")
    private String contact;
    /** 联系电话 */
    @Excel(name = "联系电话")
    private String contactno;
    /** 余额 */
    @Excel(name = "预收款余额")
    private BigDecimal prebalance;
    private BigDecimal recbalanceZK;
    /** 金蝶编号 */
    @Excel(name = "金蝶编号")
    private String kingdeenum;
    @Excel(name = "状态")
    private String statusname;

    private String allname;

    /** 省 */
    private String province;

    /** 市 */
    private String city;

    /** 区县 */
    private String district;

    /** 地址 */
    private String address;

    /** 商务联系人 */

    private String manager;

    /** 商务联系电话 */
    private String managertel;

    /** 操作人id */
    private String operatorid;

    /** 法人 */
    private String legal;

    /** 联系人邮箱 */
    private String memail;

    /** 财务联系人 */
    private String financer;

    /** 财务联系人电话 */
    private String fintel;

    /** 财务联系人邮箱 */
    private String finemail;

    /** 注册资金 */
    private BigDecimal registcapital;

    private BigDecimal prebalanceUsabling;//在途订单金额
    private BigDecimal prebalanceUsable;//可用余额=余额-在途订单金额

    /** 应收账款 */
    private BigDecimal recbalance;
    private BigDecimal recbalanceManual;
    private Integer recbalanceFlag;//有值，应收账款大于零

    /** 状态 */
    private Integer status;

    /** 创建人 */
    private String operator;

    /** 应付账款 */
    private BigDecimal paybalance;

    /** 结算币种:1-人民币,2-美元 */
    private Integer currency;

    /** 客户类型:1-销售客户,2-供应商(种植户) */
    private Integer type;

    /** 货币预付款余额 */
    private BigDecimal currprebalance;

    /** 非货币预付款余额 */
    private BigDecimal nocurrprebalance;

    /** 是否电商客户:1-电商2-普通3-海外 */
    private Integer flag;
    private Integer flagPrebalance;//1：查询prebalance大于0的

    /** 同步日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date synchtime;

    /** 同步信息 */
    private String synchinfo;

    /** 同步状态1-未同步 2-同步成功 3-同步失败 */

    private Integer synchstat;

    private String remark;
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date createtime;

    private String orgguid;

    private List<Integer> statusList;

    private String orgname;

    private Long flowid;
    private Long deptId;
    private String deptName;
    private Long orgId;

    private Long reciever_id;

    private Integer isdiscount;

    private Custbaseinfo baseinfo;

    private Financeinfo financeinfo;

    private List<Receivableflow> receivableflows;

    private List<Cashflow> cashflows;
    private List<Sellform> sellforms;

    private String[] depids;

    private String search;

    private String flagName;

    private List<FlowTempNode> nodes;

    /** 销售员id,用于分配客户后的查询 */
    private String sellerid;

    private String[] deptids;
}
